<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" >

	<head>
		<meta charset="utf-8">
		<title>托福人分类页</title>
		<link href="../c/base.css" rel="stylesheet" type="text/css">
		<link href="../c/toefl.css" rel="stylesheet" type="text/css">
		<link href="../c/bootstrap.min.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="../j/jquery-2.1.0.js"></script>
		<script type="text/javascript" src="../j/bootstrap.min.js"></script>
		<script type="text/javascript" src="js/article.js"></script>
		<script type="text/javascript">
		function editAll() {
			$("#toeflForm").submit();		
		}
		
		function editAll(){
			$("#toeflForm").submit();	
		}
	</script>
	</head>

	<body>

		<div class="container">
			<form class="form-horizontal" action="editAtricle" method="post" id="toeflForm" enctype="multipart/form-data" >
				<div class="form-group">
					<label   class="col-sm-2 control-label">宣传图片</label>
					<div class="col-sm-10">
						<label class="fileUploadLabel" for="myFile">+</label>
						<input name="myJpg" type="file" id="myFile" style="display: none;" accept="*.jpg,*.png">
						<input type="hidden" name="img_url" th:value="${session.editArticle.img_url}">
						<input type="hidden" name="article_id" th:value="${session.editArticle.article_id}">
					</div>
				</div>
				<div class="form-group">
					<label for="inputPassword3" class="col-sm-2 control-label">文章标题</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="title" th:value="${session.editArticle.title}">
					</div>
				</div>
				<div class="form-group">
					<label for="inputPassword3" class="col-sm-2 control-label">文章分类</label>
					<div class="col-sm-10">
						<select name="article_type" class="form-control" >
						
										<option value="1" th:selected="${session.editArticle.article_type == 1}">听力</option>
					    			
					    				<option value="2" th:selected="${session.editArticle.article_type == 2}">口语</option>
					    			
					    				<option value="3" th:selected="${session.editArticle.article_type == 3}">阅读</option>
					    			
					    				<option value="4" th:selected="${session.editArticle.article_type == 4}">写作</option>
					    			
					    				<option value="5" th:selected="${session.editArticle.article_type == 5}">词汇</option>
					    			
					    				<option value="6" th:selected="${session.editArticle.article_type == 6}">咨询</option>
					    			
					    				<option value="7" th:selected="${session.editArticle.article_type == 7}">活动</option>
					    			
					    				<option value="8" th:selected="${session.editArticle.article_type == 8}">机经</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="inputPassword3" class="col-sm-2 control-label">文章内容</label>
					<div class="col-sm-10">
						<textarea type="text" rows="20" class="form-control" name="article_detail" th:text="${session.editArticle.article_detail}"></textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<a href="###" class="btn btn-default" onclick="editAll()">保存</a>
					</div>
				</div>
			</form>
		</div>

	</body>

</html>